// Particle object.
// Inherits from RigidBody so that it follows basic physics principles
// but instead of representing a physical object, it represents a point
// in space from which to draw a sprite.

#pragma once

#include "core.h"
#include "rigidbody.h"
#include "..\Sprite.h"
#include "..\d3dutil.h"

namespace physics {


	class Particle : public RigidBody
	{
	// make sprite public for easy access
	public:
		Sprite		*mSprite;

	public:
		Particle(ID3DXSprite* sprite, SpriteData &spriteData, float scale, float velocity, float angularVelocity, float lifeTime, physics::Vector3 position, bool alphaFade = false);
		virtual ~Particle();

		// override the integrate function
		virtual void integrate(real dt);
		void Render(D3DXMATRIX &viewProj);
	};
}